<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" href="http://www.petercorke.com/RVC/common/toolboxhelp.css">
    <title>M-File Help: plot_poly</title>
  </head>
  <body>
  <table border="0" cellspacing="0" width="100%">
    <tr class="subheader">
      <td class="headertitle">M-File Help: plot_poly</td>
      <td class="subheader-left"><a href="matlab:open plot_poly">View code for plot_poly</a></td>
    </tr>
  </table>
<h1>plot_poly</h1><p><span class="helptopic">Draw a polygon</span></p><p>
<span style="color:red">plot_poly</span>(<strong>p</strong>, <strong>options</strong>) adds a polygon defined by columns of <strong>p</strong> (2xN), in the current
plot with default line style.

</p>
<p>
<strong>H</strong> = <span style="color:red">plot_poly</span>(<strong>p</strong>, <strong>options</strong>) as above but processes additional options and
returns a graphics handle.

</p>
<h2>Animation</h2>
<p>
<span style="color:red">plot_poly</span>(<strong>H</strong>, <strong>T</strong>) sets the pose of the polygon with handle <strong>H</strong> to the pose
given by <strong>T</strong> (3x3 or 4x4).

</p>
<p>
Create a polygon that can be animated, then alter it, eg.

</p>
<pre style="width: 90%%;" class="examples">
H&nbsp;=&nbsp;PLOT_POLY(P,&nbsp;'animate',&nbsp;'r')
PLOT_POLY(H,&nbsp;transl(2,1,0)&nbsp;);
</pre>
<h2>OPTIONS</h2>
<p>
'fillcolor',F  the color of the circle's interior, MATLAB color spec

</p>
<table class="list">
  <tr><td style="white-space: nowrap;" class="col1">'alpha', A</td> <td>transparency of the filled circle: 0=transparent, 1=solid.</td></tr>
</table>
<p>
'edgecolor',E  edge color

</p>
<table class="list">
  <tr><td style="white-space: nowrap;" class="col1"> 'animate'</td> <td>the polygon can be animated</td></tr>
  <tr><td style="white-space: nowrap;" class="col1">'tag', T</td> <td>the polygon is created with a handle graphics tag</td></tr>
  <tr><td style="white-space: nowrap;" class="col1">'axis', h</td> <td>handle of axis or UIAxis to draw into (default is current axis)</td></tr>
</table>
<ul>
  <li>For an unfilled polygon any standard MATLAB LineStyle such as 'r' or 'b---'.</li>
  <li>For an unfilled polygon any MATLAB LineProperty options can be given such as 'LineWidth', 2.</li>
  <li>For a filled polygon any MATLAB PatchProperty options can be given.</li>
</ul>
<h2>Notes</h2>
<ul>
  <li>If P (3xN) the polygon is drawn in 3D</li>
  <li>If not filled the polygon is a line segment, otherwise it is a patch
object.</li>
  <li>The 'animate' option creates an hgtransform object as a parent of the
polygon, which can be animated by the last call signature above.</li>
  <li>The graphics are added to the current plot.</li>
</ul>
<h2>See also</h2>
<p>
<a href="plot_box.html">plot_box</a>, <a href="plot_circle.html">plot_circle</a>, <a href="patch.html">patch</a>, <a href="Polygon.html">Polygon</a></p>
<hr>

<table border="0" width="100%" cellpadding="0" cellspacing="0">
  <tr class="subheader" valign="top"><td>&nbsp;</td></tr></table>
<p class="copy">&copy; 1990-2014 Peter Corke.</p>
</body></html>